
public class model extends schoolBase {

     public model(){
         //记录教务能力，若可以执行为true，否则为false
         super.courseGet = true; //必选
         super.scoreGet = true;
         super.gpaGet = true;
         super.examGet = true;
         super.courseTime = new String[]{"01:45","08:30","10:30","14:00","16:00","18:45","20:45"};
    }

    @Override
    public String Login(String id, String pas, String verifyCode) {
        // cookie请使用schoolBase内的cookies进行存储
        login = true;
        return "{\"name\": \"测试者\"}";
    }

    @Override
    public String getCourses() {
        if(login){
            return "{\"courses\":[[{\"name\":\"课程1\",\"idx\":2,\"last\":1,\"week\":[\"1-12\"],\"teacher\":\"李老师\"," +
                    "\"place\":\"A307\"}],[],[],[],[],[],[]],\"startDate\":\"2021-01-04\",\"warn\":\"数据仅供测试\"}";
        }
        return null;
    }

    @Override
    public String getScores() {
        if(login){
            return "[{\"name\":\"课程1\",\"value\": 90}]";
        }
        return null;
    }

    @Override
    public String getGPA() {
        if(login){
            return "{\"gpa\":3.8,\"all\":102,\"at\":33}";
        }
        return null;
    }

    @Override
    public String getExams() {
        if(login){
            return "[{\"name\":\"课程1考试\",\"place\":\"T202\",\"startDate\":\"2021-10-23\",\"time\":\"15:00~17:00\"}]";
        }
        return null;
    }
}
